package com.shelpe.services.sinbad.entity.jpa;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;

import com.shelpe.services.sinbad.entity.jpa.TargetTag.TargetTagPK;

import lombok.Data;

@Entity(name = "rpt_targeting_tag")
@IdClass(TargetTagPK.class)
@Data
public class TargetTag {

	@Id
	@Column(name = "adgroup_id")
	private long adgroupID;
	@Id
	@Column(name = "crowd_id")
	private long crowdID;
	@Id
	private Date date;
	@Id
	private int source;// 流量来源( PC站内:1， PC站外:2 , 移动站内:4，移动站外:5)
	@Id
	private int searchType;// 报表类型（搜索：0,类目出价：1, 单品定向：2, 店铺定向:3）
	@Column(name = "taobao_user_id")
	private long userID;
	@Column(name = "campaign_id")
	private long campaignID;
	private float cpc;
	private float ctr;
	private int impressions;
	private float cpm;
	private int click;
	private int cost;
	private float roi;// 投入产出比
	private int directPay;// 直接成交金额
	private int indirectPay;// 间接成交金额
	private int directPayCount;// 直接成交笔数
	private int indirectPayCount;// 间接成交笔数
	private int payTotalCount;
	private int payTotal;
	private int favShopCount;// 收藏店铺数
	private int favItemCount;// 收藏宝贝数
	private int favTotal;// 总收藏数
	private int directCartTotal;// 直接购物车数
	private int indirectCartTotal;// 间接购物车数
	private int cartTotal;// 购物车总数
	private float coverage;// 点击转化率

	@Data
	public static class TargetTagPK implements Serializable {
		private static final long serialVersionUID = 1L;
		@Column(name = "adgroup_id")
		private long adgroupID;
		@Column(name = "crowd_id")
		private long crowdID;
		private Date date;
		private int source;
		private int searchType;
	}
}
